From 1ab469c905ee920d58d96fecef5bdd034035ca30 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 20 Apr 2006 02:26:00 +0000 Subject: [PATCH] Pick up some more missing pieces from jeeps/ --- gpsbabel/jeeps/gpsserial.c | 6 ++++- gpsbabel/jeeps/gpsusbcommon.h | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 gpsbabel/jeeps/gpsusbcommon.h diff --git a/gpsbabel/jeeps/gpsserial.c b/gpsbabel/jeeps/gpsserial.c index 0496374a6..3e586e6d3 100644 --- a/gpsbabel/jeeps/gpsserial.c +++ b/gpsbabel/jeeps/gpsserial.c @@ -223,7 +223,11 @@ int32 GPS_Serial_Read(gpsdevh * dh, void *ibuf, int size) #include #include #include -#include "gpsserial_posix.h" + +typedef struct { + int fd; /* File descriptor */ + struct termios gps_ttysave; +} posix_serial_data; /* @func GPS_Serial_Restoretty *********************************************** ** diff --git a/gpsbabel/jeeps/gpsusbcommon.h b/gpsbabel/jeeps/gpsusbcommon.h new file mode 100644 index 000000000..0293cab49 --- /dev/null +++ b/gpsbabel/jeeps/gpsusbcommon.h @@ -0,0 +1,46 @@ +#if !defined(NO_USB) +/* + Garmin USB layer - OS independent component. + + Copyright (C) 2006 Robert Lipe, robertlipe@usa.net + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA + + */ + +/* + * The 'low level ops' are registered by the OS layer (win32, libusb, etc.) + * to provide gruntwork features for the common USB layer. + */ +typedef int (*gusb_llop_get)(garmin_usb_packet *ibuf, size_t sz); +typedef int (*gusb_llop_send)(const garmin_usb_packet *opkt, size_t sz); +typedef int (*gusb_llop_close) (gpsdevh *dh); + +typedef struct gusb_llops { + gusb_llop_get llop_get_intr; + gusb_llop_get llop_get_bulk; + gusb_llop_send llop_send; + gusb_llop_close llop_close; +} gusb_llops_t; + +/* Provided by the common code. */ +void gusb_syncup(void); +void gusb_register_ll(struct gusb_llops *); +void gusb_list_units(void); + +/* Provided by the OS layers */ +// int gusb_init(const char *portname, gpsdev **dh); + +#endif -- 2.30.2